home *** CD-ROM | disk | FTP | other *** search
- //% CC -I. vectest.c -o vectest -lm
- #include "hvector.h"
- #include "hmatrix.h"
-
- main() {
- Vector fnull(0,0,0),
- fcomponent(1,2,3),
- fcopy(fcomponent);
-
- cout << "Null vector = " << fnull << endl
- << "Componentwise constructor = " << fcomponent << endl
- << "Reference constructor = " << fcopy << endl;
-
- if (fcomponent != fcopy)
- cout << "fcomponent != fcopy (bogus)\n";
-
- HVector h(fcomponent),
- hassign = fcomponent;
-
- HVector hequal;
- hequal = fcomponent;
-
- cout << "Homogenous h(v) = " << h << endl
- << "h = v = " << hassign << endl
- << "h; h = v = " << hequal << endl;
-
- Vector vassign = h;
-
- cout << "Assign back v = h = " << vassign << endl;;
- }
-